package com.wang.security.custom;

/**
 * @author wjh
 * @create 2023-06-11
 */
public class LoginInfoHelper {
    private static ThreadLocal<Long> userId = new ThreadLocal<>();
    private static ThreadLocal<String> username = new ThreadLocal<>();

    public static ThreadLocal<Long> getUserId() {
        return userId;
    }

    public static void setUserId(Long userId) {
        LoginInfoHelper.userId.set(userId);
    }

    public static ThreadLocal<String> getUsername() {
        return username;
    }

    public static void setUsername(String username) {
        LoginInfoHelper.username.set(username);
    }
}
